<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
<head>
    <!-- 包含公共的JSP代码片段 -->

    <title>无线点餐平台</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/detail/style/js/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/detail/style/js/page_common.js"></script>
    <link href="${pageContext.request.contextPath}/detail/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
    <link rel="${pageContext.request.contextPath}/detail/stylesheet" type="text/css" href="${pageContext.request.contextPath}style/css/index_1.css" />
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
    <div id="TitleArea_Head"></div>
    <div id="TitleArea_Title">
        <div id="TitleArea_Title_Content">
            <img border="0" width="13" height="13"
                 src="${pageContext.request.contextPath}style/images/title_arrow.gif" /> 类型列表
        </div>
    </div>
    <div id="TitleArea_End"></div>
</div>
<!-- 过滤条件 -->
<div id="QueryArea">
    <form action="../getDessertType.action" method="post">
        <input type="hidden" name="method" value="search">
        <input type="text"  name="condition" title="请输入用户名称" value="${condition}">
        <input id="textkey" type="submit" value="搜索">
    </form>
</div>

<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" align="center" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
        <tr align="center" valign="middle" id="TableTitle">
            <td>类型编号</td>
            <td>类型名称</td>
        </tr>

        </thead>
        <!--显示数据列表 -->
        <tbody id="TableData">
        <c:if test="${page.list==null || fn:length(page.list) == 0}">
            <tr>
                <td colspan="5">还没有订单哦！</td>
            </tr>
        </c:if>
        <c:forEach items="${page.list}" var="item" varStatus="status">
            <tr height="60" align="center">
                <td>${item.typeId}</td>
                <td>${item.typeName}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>

    <!-- 其他功能超链接 -->
    <div id="TableTail" align="center">
        <div class="FunctionButton">
            <a href="${pageContext.request.contextPath}/detail/saveCuisine.jsp">添加</a>
        </div>
        <div>
            <tr>
                <td colspan="6" align="center" bgcolor="#5BA8DE">共${page.totalRecords}条记录 共${page.totalPages}页 当前第${page.pageNo}页
                    <a href="../getDessertType.action?pageNo=${page.topPageNo }&condition=${condition}"><input type="button" name="fristPage" value="首页" /></a>
                    <c:choose>
                        <c:when test="${page.pageNo!=1}">
                            <a href="../getDessertType.action?pageNo=${page.previousPageNo }&condition=${condition}"><input type="button" name="previousPage" value="上一页" /></a>
                        </c:when>
                        <c:otherwise>
                            <input type="button" disabled="disabled" name="previousPage" value="上一页" />
                        </c:otherwise>
                    </c:choose>
                    <c:choose>
                        <c:when test="${page.pageNo != page.totalPages}">
                            <a href="../getDessertType.action?pageNo=${page.nextPageNo}&condition=${condition}"><input type="button" name="nextPage" value="下一页" /></a>
                        </c:when>
                        <c:otherwise>
                            <input type="button" disabled="disabled" name="nextPage" value="下一页" />
                        </c:otherwise>
                    </c:choose>
                    <a href="../getDessertType.action?pageNo=${page.bottomPageNo }&condition=${condition}"><input type="button" name="lastPage" value="尾页" /></a>
                </td>
            </tr>
        </div>
    </div>
</div>
</body>
</html>
